"  ____ ___ _______   __    _   ___     _____ __  __ ____   ____
" / ___|_ _|_   _\ \ / /   | \ | \ \   / /_ _|  \/  |  _ \ / ___|
"| |    | |  | |  \ V /____|  \| |\ \ / / | || |\/| | |_) | |
"| |___ | |  | |   | |_____| |\  | \ V /  | || |  | |  _ <| |___
" \____|___| |_|   |_|     |_| \_|  \_/  |___|_|  |_|_| \_\\____|
"
"|--------------------------YouCompleteMe------------------------------|
"|		       默认环境Python3                                 |
"|		sudo pacman -S python3-pip                             |
"|		sudo pacman -S Cmake                                   |
"|		去YCM文件夹跑测试                                      |
"|		pip3 install flake8                                    |
"|		pip3 install nose                                      |
"|		pip3 install future                                    |
"|		pip3 install mock                                      |
"|		yay -S python3-hamcrest                                | 
"|-------------本人不用Vim做项目，这是以前安装处理的一些问题-----------|


set  number "行号
syntax on "关键词色彩
set wrap "超过框体换行
set showcmd "显示输入命令
"set cursorline
"hi  CursorLine  cterm=NONE ctermbg=blue
set mouse=a "鼠标操作
set wildmenu "命令行Tab联想
set hlsearch "查询关键字高亮
exec "nohlsearch"
set incsearch "当前输入查询高亮
set ignorecase "忽略搜索大小写
set smartcase "智能大小写搜索
set laststatus=2 "默认开启AirLine
set scrolloff=10 "保持～行可见

"按键设置
map s :noh<CR>
map Q :q<CR>
map S :w<CR>
map R :source $MYVIMRC<CR>
map r :PlugInstall<CR>

"设置分屏
map s<right> :set splitright<CR>:vsplit<CR>
map s<left> :set nosplitright<CR>:vsplit<CR>
map s<up> :set nosplitbelow<CR>:split<CR>
map s<down> :set splitbelow<CR>:split<CR>

"对分区切换设置
map <S-up> <C-w>k
map <S-down> <C-w>j
map <S-left> <C-w>h
map <S-right> <C-w>l

"对分区大小设置
map <C-up> :res +5<CR>
map <C-down> :res -5<CR>
map <C-left> :vertical resize-5<CR>
map <C-right> :vertical resize+5<CR>

"窗口创建
map wq :tabe<CR>
"窗口切换
map <C-a> :tabnext<CR>

"设置<LEADER>的指令
let mapleader=' '   "Space
noremap ; :



"Plug插件
call plug#begin('~/.config/nvim/plugged')

Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'

"文件相关
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'Xuyuanp/nerdtree-git-plugin'

"报错
Plug 'dense-analysis/ale'

"文件内获取权限
Plug 'lambdalisue/suda.vim'

"MarkDowm
Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']}

call plug#end()



" ===
" === NERDTree
" ===
map ff :NERDTreeToggle<CR>

" ==
" == NERDTree-git
" ==
let g:NERDTreeIndicatorMapCustom = {
    \ "Modified"  : "✹",
    \ "Staged"    : "✚",
    \ "Untracked" : "✭",
    \ "Renamed"   : "➜",
    \ "Unmerged"  : "═",
    \ "Deleted"   : "✖",
    \ "Dirty"     : "✗",
    \ "Clean"     : "✔︎",
    \ "Unknown"   : "?"
    \ }

" ===
" === ale
" ===
let b:ale_linters = ['pylint']
let b:ale_fixers = ['autopep8', 'yapf']

" ===
" === Airline
" ===
let g:airline_theme='violet'

" ===
" === MarkdownPreview
" ===
let g:mkdp_auto_start = 1
let g:mkdp_auto_close = 1
let g:mkdp_refresh_slow = 0
let g:mkdp_command_for_global = 0
let g:mkdp_open_to_the_world = 0
let g:mkdp_open_ip = ''
let g:mkdp_browser = 'google-chrome-stable'
let g:mkdp_echo_preview_url = 0
let g:mkdp_browserfunc = ''
let g:mkdp_preview_options = {
    \ 'mkit': {},
    \ 'katex': {},
    \ 'uml': {},
    \ 'maid': {},
    \ 'disable_sync_scroll': 0,
    \ 'sync_scroll_type': 'middle',
    \ 'hide_yaml_meta': 1
    \ }
let g:mkdp_markdown_css = ''
let g:mkdp_highlight_css = ''
let g:mkdp_port = ''
let g:mkdp_page_title = '「${name}」'

" ===
" === MarkdownPreview Settings
" ===
" example
nmap <C-s> <Plug>MarkdownPreview
nmap <C-S> <Plug>MarkdownPreviewStop
nmap <C-p> <Plug>MarkdownPreviewToggle





"Vundle插件管理器
"---------------------------------------------
"set nocompatible
"filetype off
"set rtp+=~/.vim/bundle/Vundle.vim
"call vundle#begin()


"Plugin 'VundleVim/Vundle.vim'


"call vundle#end()
